<template>
    <div class="aside_box">
      <div class="fBox">
        <p class="current">冰吧</p>
        <div class="wrap">
            <div class="little_box" v-for="(item,index) in iceBar" :key=index>{{item}}</div>
        </div>
      </div>
      <div class="fBox">
        <p class="current">冰柜</p>
        <div class="wrap">
            <div class="little_box" v-for="(item,index) in wineBar" :key=index>{{item}}</div>
        </div>
      </div>
    </div>
</template>
<script>
export default {
  data(){
    return{
      iceBar:{},
      wineBar:{}
    }
  },
  mounted(){
        this.$http.get('./data/products.json')
      .then((response)=> {
        this.iceBar=response.data.wineBar.slice(0,4);
        this.wineBar=response.data.wineBar.slice(4,8);
      })
      .catch(function (error) {
        console.log(error);
      })
      .then(function () {
        // always executed
      });
      }
}
</script>
